/*****************************************************************************
 *
 * Copyright 2006, 2007
 * Nanotron Technologies
 *
 * Author: S. Radtke
 *
 * Description :
 *    This file contains the source code for the i/q matrix values used
 *    to generate the chirp seqences
 *
 ****************************************************************************/
#include <string.h>
#include "config.h"
#include "ntrxtypes.h"
#include "ntrxutil.h"
#include "ntrxiqpar.h"
#include "nnspi.h"

typedef struct NTRXagcValSt
{
    MyByte8T thresh1;
    MyByte8T thresh2;
    MyByte8T deadtime;
    MyByte8T nreg;
    MyInt16T inttime;
} NTRXagcValSt;

#ifdef CONFIG_22MHZ_DEF_ONLY
void NTRXSetCorrThreshold2 (void)
{
    MyByte8T threshold[] = {0x00, 0x31, 0x31, 0x31, 0x31};
    NTRXSetIndexReg (0x32);
    NTRXWriteSPI (0x80, threshold, 5);
    NTRXSetIndexReg (0x00);
}
#else
#ifdef CONFIG_NTRX_80MHZ_500NS
static const MyByte8T NA5TR1_Rx_80MHz_500ns[] PROGMEM =
{
    8,
    0x07, 0x38, 0xE0, 0xFF, 0xFF, 0xE0, 0xE3, 0x9C,
    0x0E, 0x63, 0x87, 0xF0, 0x01, 0xFC, 0x38, 0xCE,
};
#endif /* CONFIG_NTRX_80MHZ_500NS */

#ifdef CONFIG_NTRX_80MHZ_1000NS
static const MyByte8T NA5TR1_Rx_80MHz_1000ns[] PROGMEM =
{
    16,
    0x02, 0x63, 0x39, 0xC7, 0x0E, 0x0F, 0xC0, 0x1F, 0xFF, 0xE0, 0x0F, 0xC3, 0xC3, 0x8E, 0x73, 0x39,
    0x00, 0xCE, 0x63, 0x1C, 0x38, 0x3E, 0x03, 0xFF, 0xFF, 0xFF, 0x01, 0xF0, 0xF0, 0xE7, 0x19, 0x8C,
};
#endif /* CONFIG_NTRX_80MHZ_1000NS */
#ifdef CONFIG_NTRX_80MHZ_2000NS
static const MyByte8T NA5TR1_Rx_80MHz_2000ns[] PROGMEM =
{
    31,
    0x0C, 0xCC, 0xE6, 0x73, 0x1C, 0xE3, 0x8E, 0x1C, 0x3C, 0x3E, 0x0F, 0xC0, 0x7F, 0xE0, 0x00, 0x00,
    0x00, 0x00, 0x7F, 0xC0, 0x3F, 0x07, 0xC3, 0xC3, 0x87, 0x1C, 0x73, 0x9C, 0xE6, 0x63, 0x33,
    0x09, 0x99, 0x8C, 0xC6, 0x31, 0xCE, 0x3C, 0x70, 0xF0, 0xF0, 0x7E, 0x03, 0xFC, 0x00, 0x1F, 0xFF,
    0xFF, 0x80, 0x03, 0xFC, 0x07, 0xC1, 0xF0, 0xF0, 0xE3, 0x8E, 0x38, 0xC6, 0x73, 0x31, 0x99,
};
#endif /* CONFIG_NTRX_80MHZ_2000NS */
#ifdef CONFIG_NTRX_80MHZ_4000NS
static const MyByte8T NA5TR1_Rx_80MHz_4000ns[] PROGMEM =
{
    32,
    0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0xFF, 0xC0, 0x1F, 0xC0, 0x7E, 0x07, 0xC1, 0xF0, 0xF8, 0x78, 0x78,
    0xF1, 0xE3, 0x87, 0x1C, 0x63, 0x8C, 0x73, 0x9C, 0xE6, 0x33, 0x99, 0x98, 0xCC, 0xCC, 0xC0, 0x00,
    0x00, 0x01, 0xFF, 0xFF, 0xC0, 0x03, 0xFE, 0x01, 0xFC, 0x0F, 0xC1, 0xF8, 0x3C, 0x1E, 0x1E, 0x1E,
    0x3C, 0x78, 0xE3, 0x8E, 0x38, 0xC7, 0x38, 0xC6, 0x73, 0x99, 0xCC, 0xCE, 0x66, 0x66, 0x60, 0x00,
};
#endif /* CONFIG_NTRX_80MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_500NS
static const MyByte8T NA5TR1_Rx_22MHz_500ns[] PROGMEM =
{
    2,
    0xC3, 0xC3,
    0x9F, 0xF9,
};
#endif /* CONFIG_NTRX_22MHZ_500NS */

#ifdef CONFIG_NTRX_22MHZ_1000NS
static const MyByte8T NA5TR1_Rx_22MHz_1000ns[] PROGMEM =
{
    4,
    0xC6, 0x0F, 0xF0, 0x63,
    0x9C, 0x7F, 0xFE, 0x39,
};
#endif /* CONFIG_NTRX_22MHZ_1000NS */

#ifdef CONFIG_NTRX_22MHZ_2000NS
static const MyByte8T NA5TR1_Rx_22MHz_2000ns[] PROGMEM =
{
    8,
    0x99, 0xC7, 0x0F, 0xE0, 0x07, 0xF0, 0xE3, 0x99,
    0x33, 0x1C, 0x3E, 0x00, 0x00, 0x7C, 0x38, 0xCC,
};
#endif /* CONFIG_NTRX_22MHZ_2000NS */

#ifdef CONFIG_NTRX_22MHZ_4000NS
static const MyByte8T NA5TR1_Rx_22MHz_4000ns[] PROGMEM =
{
    16,
    0x93, 0x19, 0xCE, 0x38, 0x70, 0x7E, 0x00, 0xFF, 0xFF, 0x00, 0x7E, 0x0E, 0x1C, 0x73, 0x98, 0xC9,
    0x26, 0x33, 0x1C, 0xE1, 0xC1, 0xF0, 0x1F, 0xFF, 0xFF, 0xF8, 0x0F, 0x83, 0x87, 0x38, 0xCC, 0x64,
};
#endif /* CONFIG_NTRX_22MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_8000NS
static const MyByte8T NA5TR1_Rx_22MHz_8000ns[] PROGMEM =
{
    32,
    0x36, 0x66, 0x73, 0x39, 0x8C, 0x71, 0x8F, 0x1C, 0x3C, 0x3E, 0x0F, 0x80, 0xFF, 0x00, 0x07, 0xFF,
    0xFF, 0xE0, 0x00, 0xFF, 0x01, 0xF0, 0x7C, 0x3C, 0x38, 0xF1, 0x8E, 0x31, 0x9C, 0xCE, 0x66, 0x6C,
    0x64, 0xCC, 0xE6, 0x63, 0x18, 0xC7, 0x1C, 0x78, 0xF0, 0xF0, 0x7C, 0x0F, 0xE0, 0x07, 0xFF, 0xFF,
    0xFF, 0xFF, 0xE0, 0x07, 0xF0, 0x3E, 0x0F, 0x0F, 0x1E, 0x38, 0xE3, 0x18, 0xC6, 0x67, 0x33, 0x26,
};
#endif /* CONFIG_NTRX_22MHZ_8000NS */

#ifdef CONFIG_NTRX_22MHZ_16000NS
static const MyByte8T NA5TR1_Rx_22MHz_16000ns[] PROGMEM =
{
    32,
    0xFF, 0xFE, 0x00, 0x00, 0x3F, 0xFC, 0x01, 0xFE, 0x03, 0xF0, 0x3F, 0x07, 0xC3, 0xE1, 0xE1, 0xE1,
    0xC3, 0x87, 0x1C, 0x71, 0xC7, 0x18, 0xE7, 0x39, 0xCC, 0x66, 0x33, 0x39, 0x99, 0x99, 0x9B, 0x33,
    0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0xFF, 0xE0, 0x1F, 0xC0, 0x7E, 0x07, 0xC1, 0xF0, 0x78, 0x78, 0x78,
    0x70, 0xE3, 0xC7, 0x1C, 0x73, 0x8E, 0x73, 0x9C, 0xE6, 0x33, 0x99, 0x9C, 0xCC, 0xCC, 0xCD, 0x99,
};
#endif /* CONFIG_NTRX_22MHZ_16000NS */

#ifdef CONFIG_NTRX_22MHZ_HR_4000NS
static const MyByte8T NA5TR1_Rx_22MHz_HR_4000ns[] PROGMEM =
{
	32,
	0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xC0, 0x00,
	0x3F, 0xFF, 0x80, 0x03, 0xFF, 0xC0, 0x07, 0xFF, 0x00, 0x3F, 0xF0, 0x0F, 0xFF, 0xFF, 0xF0, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
	0x00, 0x3F, 0xFF, 0x00, 0x0F, 0xFF, 0x00, 0x1F, 0xFC, 0x01, 0xFF, 0x80, 0x7F, 0xFF, 0xF0, 0x00
};
#endif /* CONFIG_NTRX_22MHZ_HR_4000NS */

#ifdef CONFIG_NTRX_80MHZ_500NS
static const MyByte8T NA5TR1_Tx_80MHz_500ns[] PROGMEM =
{
    61,
    0xE0, 0x9C, 0x5C, 0xEF, 0xEB, 0x4A, 0x86, 0x6A, 0xBF, 0xAC, 0x8B, 0x01, 0x15, 0xF2, 0x7F, 0xF6,
    0xDF, 0xCA, 0x40, 0x84, 0x51, 0x21, 0x6F, 0x39, 0xFE, 0xFF, 0x3E, 0xBB, 0x39, 0xB7, 0xB6, 0xF6,
    0x78, 0xFA, 0xBC, 0xFF, 0xBF, 0x7C, 0xF5, 0x68, 0x59, 0x0A, 0x01, 0x83, 0xD3, 0xAB, 0xFD, 0xBB,
    0x64, 0x48, 0xC2, 0x1A, 0xFA, 0xB9, 0x96, 0x81, 0xDB, 0xF3, 0x25, 0x1A, 0x1F,
    0xF7, 0xE6, 0x89, 0x6C, 0xB6, 0xD0, 0x25, 0xDE, 0x0E, 0x36, 0x80, 0x62, 0xD9, 0x9E, 0x1F, 0x9A,
    0x04, 0x90, 0xC0, 0xF2, 0xB6, 0xFA, 0xBD, 0x2F, 0x8F, 0xEF, 0x6F, 0x0E, 0xDE, 0xAD, 0x9D, 0xAD,
    0xBE, 0xEE, 0x3F, 0xAF, 0x3F, 0xDE, 0x7B, 0xE8, 0xE4, 0x61, 0x60, 0x12, 0x27, 0x2D, 0x4F, 0xFC,
    0xF5, 0x40, 0x62, 0x0B, 0xEF, 0x2A, 0xE1, 0xE2, 0x5A, 0x9B, 0xB7, 0x27, 0xE8,
    0x79, 0x89, 0xAE, 0x66, 0x14, 0x78, 0xFB, 0xCB, 0x3A, 0x00, 0x58, 0xD2, 0xFF, 0xBF, 0x52, 0x08,
    0x08, 0x44, 0x99, 0xDA, 0xFB, 0xFB, 0xDF, 0xB7, 0x8E, 0x69, 0x4D, 0x39, 0x2C, 0x28, 0x24, 0x28,
    0x34, 0x40, 0x59, 0x79, 0xA2, 0xCA, 0xEF, 0xFF, 0xEF, 0xBF, 0x72, 0x25, 0x00, 0x24, 0x85, 0xE6,
    0xF7, 0x9B, 0x21, 0x0C, 0x80, 0xF7, 0xCB, 0x35, 0x2C, 0x99, 0xA2, 0x7A, 0x7D,
};
#endif /* CONFIG_NTRX_80MHZ_500NS */

#ifdef CONFIG_NTRX_80MHZ_1000NS
static const MyByte8T NA5TR1_Tx_80MHz_1000ns[] PROGMEM =
{
    61,
    0x20, 0xE0, 0x1D, 0xDE, 0x27, 0xA3, 0x12, 0x17, 0xF1, 0xB1, 0x10, 0x04, 0xA4, 0xFF, 0x6D, 0x09,
    0x03, 0xE2, 0xBD, 0x75, 0xD4, 0xC0, 0x0D, 0x2C, 0x7F, 0x35, 0x19, 0x03, 0xC3, 0x57, 0xB1, 0xBF,
    0x39, 0xA5, 0xCF, 0x02, 0xC2, 0x0F, 0xE2, 0x73, 0xFD, 0xFE, 0x77, 0xEA, 0x5B, 0x4F, 0x85, 0x01,
    0x80, 0x84, 0x49, 0x10, 0xD7, 0x9E, 0xE4, 0x2A, 0xEE, 0xB1, 0x33, 0x75, 0x75,
    0x08, 0xF7, 0xF7, 0x48, 0x1A, 0x56, 0xA4, 0x09, 0xCD, 0xE8, 0x81, 0xA4, 0xED, 0x4E, 0x36, 0xA0,
    0xE4, 0xFC, 0x9F, 0x89, 0x21, 0xC0, 0x97, 0xDE, 0x5F, 0x9A, 0x13, 0x20, 0xD2, 0xE9, 0xAE, 0x5F,
    0xDC, 0x16, 0x51, 0x60, 0xB1, 0xA6, 0xFA, 0x8E, 0x9F, 0x9E, 0xAC, 0x28, 0x05, 0x52, 0xE0, 0x90,
    0x40, 0xE1, 0x63, 0xB5, 0xE6, 0xF8, 0xF9, 0xDB, 0xCB, 0xAC, 0x8D, 0x7D, 0x6D,
    0x7E, 0x79, 0x85, 0x96, 0x6E, 0x51, 0x95, 0xCF, 0x7A, 0x14, 0x5C, 0xEA, 0xDB, 0x42, 0x04, 0x6C,
    0xEE, 0xE3, 0x62, 0x04, 0x30, 0xB1, 0xFF, 0xCF, 0x56, 0x04, 0x1C, 0x7D, 0xE2, 0xFF, 0xC7, 0x62,
    0x14, 0x04, 0x30, 0x81, 0xD2, 0xFB, 0xF7, 0xC7, 0x86, 0x45, 0x14, 0x00, 0x08, 0x24, 0x4C, 0x7D,
    0xA6, 0xCA, 0xE7, 0xF7, 0xFF, 0xFF, 0xFB, 0xF7, 0xEF, 0xE7, 0xE3, 0xDF, 0xDB,
};
#endif /* CONFIG_NTRX_80MHZ_1000NS */

#ifdef CONFIG_NTRX_80MHZ_2000NS
static const MyByte8T NA5TR1_Tx_80MHz_2000ns[] PROGMEM =
{
    122,
    0x1F, 0x20, 0xE0, 0x9E, 0x5F, 0xA3, 0x20, 0xDA, 0x1F, 0xE8, 0xA1, 0x14, 0x5B, 0xEE, 0x29, 0xD0,
    0x50, 0xAC, 0xB5, 0x99, 0xC4, 0x9C, 0x3B, 0x70, 0x4B, 0x84, 0xE6, 0xBF, 0xEB, 0x07, 0xC5, 0xE6,
    0x3F, 0x6F, 0x4C, 0xC1, 0x9C, 0xFB, 0x39, 0xDB, 0x41, 0x09, 0xE9, 0x7E, 0xB4, 0x15, 0x41, 0xCA,
    0x27, 0xFD, 0xB9, 0x5F, 0x06, 0x42, 0x15, 0xB1, 0x7F, 0xB6, 0x1D, 0x46, 0x81, 0xCF, 0xE8, 0xFB,
    0x3E, 0x2F, 0x58, 0x45, 0x00, 0x4B, 0xA0, 0xF4, 0xFE, 0xBC, 0x2D, 0x5A, 0xC9, 0x00, 0x03, 0xCF,
    0x60, 0xF1, 0xBC, 0x7F, 0x3A, 0xAE, 0xDF, 0xD1, 0x86, 0x00, 0x01, 0x07, 0xD1, 0xDD, 0xA9, 0xF3,
    0x7A, 0xFE, 0xBF, 0xBC, 0x37, 0x30, 0x28, 0x20, 0x58, 0x91, 0x4C, 0x47, 0x84, 0x42, 0x00, 0x00,
    0x40, 0x81, 0xC2, 0x04, 0x45, 0xC6, 0x07, 0x08, 0x49, 0x49,
    0x08, 0x08, 0xF7, 0xF7, 0x28, 0x08, 0xB7, 0xF6, 0x79, 0x19, 0x56, 0xC5, 0xD9, 0x6B, 0x17, 0x32,
    0xE7, 0x2D, 0x5A, 0x72, 0x12, 0xCB, 0xAF, 0x67, 0x90, 0xE4, 0xED, 0x2E, 0x25, 0xC0, 0x04, 0xED,
    0x4F, 0x47, 0x70, 0x92, 0xFB, 0x0F, 0xEB, 0x02, 0x60, 0x66, 0xED, 0x6F, 0x89, 0x22, 0x90, 0x65,
    0xED, 0xAF, 0xDB, 0x04, 0xD0, 0x92, 0xD9, 0xAE, 0x3F, 0x9A, 0x04, 0xD0, 0x61, 0xA6, 0xEC, 0xFF,
    0x7E, 0x49, 0x13, 0xE0, 0x41, 0x85, 0xFA, 0x8E, 0x6F, 0x1D, 0x39, 0x14, 0xA0, 0xB0, 0xD2, 0xA5,
    0xFA, 0xAD, 0xDF, 0xDF, 0xED, 0x39, 0x05, 0x42, 0xD0, 0xA0, 0x81, 0x43, 0xC5, 0xF8, 0xEB, 0x8D,
    0x0F, 0x6F, 0xCF, 0x2E, 0xAD, 0x5B, 0x19, 0x07, 0x15, 0x33, 0x72, 0xC1, 0x10, 0x60, 0xB0, 0x00,
    0x40, 0x80, 0xB0, 0xE1, 0x01, 0x21, 0x42, 0x52, 0x52, 0x62,
    0x82, 0x7E, 0x7D, 0x85, 0x86, 0x76, 0x71, 0x91, 0x9A, 0x6A, 0x59, 0x99, 0xB6, 0x6E, 0x35, 0x81,
    0xD6, 0x9B, 0x25, 0x40, 0xCE, 0xE3, 0x5A, 0x04, 0x68, 0xF2, 0xD3, 0x3E, 0x04, 0x78, 0xF7, 0xD7,
    0x46, 0x00, 0x58, 0xE2, 0xF3, 0x7B, 0x0C, 0x20, 0x9D, 0xFB, 0xD7, 0x56, 0x04, 0x2C, 0xA5, 0xFB,
    0xDF, 0x6E, 0x0C, 0x10, 0x6C, 0xDA, 0xFF, 0xC3, 0x56, 0x08, 0x10, 0x64, 0xCA, 0xFF, 0xE3, 0x8E,
    0x31, 0x00, 0x18, 0x64, 0xBE, 0xF7, 0xF7, 0xC3, 0x6E, 0x25, 0x00, 0x10, 0x48, 0x91, 0xD6, 0xFB,
    0xFB, 0xD3, 0x96, 0x55, 0x20, 0x04, 0x04, 0x20, 0x50, 0x85, 0xBA, 0xE3, 0xFB, 0xFF, 0xEF, 0xD3,
    0xAF, 0x86, 0x5D, 0x39, 0x1C, 0x0C, 0x00, 0x00, 0x08, 0x14, 0x24, 0x38, 0x4D, 0x61, 0x75, 0x8A,
    0x9A, 0xAA, 0xB6, 0xBE, 0xC7, 0xCF, 0xD3, 0xD7, 0xDB, 0xDB,
};
#endif /* CONFIG_NTRX_80MHZ_2000NS */

#ifdef CONFIG_NTRX_80MHZ_4000NS
static const MyByte8T NA5TR1_Tx_80MHz_4000ns[] PROGMEM =
{
    244,
    0xE0, 0xDF, 0x20, 0x20, 0xDF, 0xDF, 0x60, 0x21, 0x9F, 0x9D, 0xA0, 0x63, 0x1E, 0x5B, 0x21, 0xE5,
    0x9E, 0xD8, 0xA1, 0xA9, 0x1F, 0xD5, 0xDE, 0xEC, 0x63, 0x92, 0x19, 0x2D, 0xEA, 0x53, 0xD0, 0xA9,
    0x73, 0x9B, 0xC9, 0x5D, 0x77, 0x6A, 0x8B, 0x4D, 0x6E, 0x79, 0x9B, 0x03, 0xD8, 0x7A, 0x73, 0x8E,
    0xC3, 0x63, 0xFE, 0x2C, 0x07, 0x45, 0x69, 0x7F, 0x68, 0x05, 0xC7, 0x6A, 0x7F, 0xAA, 0x07, 0xC5,
    0xA6, 0x3F, 0x6F, 0x8C, 0xC1, 0x9C, 0xFB, 0x78, 0x17, 0xC0, 0xCE, 0x30, 0x3F, 0x29, 0x49, 0x02,
    0x5C, 0xFA, 0xFB, 0xDF, 0x03, 0x86, 0xA3, 0xFC, 0x39, 0x1C, 0x03, 0x86, 0x62, 0xFC, 0xFA, 0x60,
    0x05, 0x03, 0x5A, 0xB6, 0x3E, 0x6C, 0x0F, 0xC0, 0x4C, 0x27, 0xFD, 0x3A, 0x63, 0x89, 0x40, 0x4F,
    0xAB, 0xFD, 0x7A, 0xE4, 0xCB, 0xC0, 0x8B, 0x24, 0xB9, 0x7E, 0xEF, 0xD6, 0x03, 0x02, 0x92, 0x6B,
    0xFC, 0xFD, 0xAD, 0xD6, 0x04, 0x81, 0x4E, 0xE5, 0x78, 0x3F, 0x76, 0x23, 0x8E, 0x01, 0x43, 0xD1,
    0x26, 0x78, 0xBF, 0xB9, 0xE9, 0x15, 0x45, 0x80, 0x87, 0x16, 0xA9, 0x78, 0xBF, 0x7B, 0x6D, 0xDC,
    0x8C, 0x02, 0x01, 0x09, 0x18, 0x28, 0xF6, 0xFE, 0xFE, 0x36, 0x68, 0x99, 0x8B, 0x02, 0x80, 0x45,
    0x4F, 0xDC, 0x2A, 0xB6, 0xFD, 0xBF, 0x3B, 0xB3, 0xA8, 0x5B, 0xD0, 0xC7, 0x01, 0x40, 0x83, 0x8A,
    0x13, 0xDE, 0x68, 0xB2, 0x39, 0xFD, 0xFF, 0x3E, 0xF9, 0xF3, 0xEB, 0xE3, 0x9B, 0xD3, 0x4C, 0x06,
    0x42, 0x00, 0x40, 0xC1, 0x84, 0x88, 0xCD, 0x52, 0xD8, 0x1D, 0xA3, 0xE8, 0xED, 0xF1, 0xF5, 0x78,
    0x3B, 0x7C, 0xBE, 0xFF, 0xFF, 0xFF, 0xBF, 0xBE, 0x7E, 0x3D, 0xFC, 0xBB, 0xBA, 0x79, 0x38, 0xF8,
    0xF7, 0xB7, 0xB6, 0xB6,
    0xF7, 0xF7, 0x08, 0xF8, 0xF7, 0x07, 0x18, 0xF8, 0xE7, 0x07, 0x28, 0xF8, 0xC7, 0x17, 0x59, 0xE8,
    0x96, 0x16, 0x89, 0xF9, 0x66, 0xF5, 0xB9, 0x2A, 0x36, 0xA4, 0xD9, 0x8C, 0x27, 0x33, 0xB6, 0x1C,
    0x8A, 0xB3, 0x13, 0x7B, 0x6D, 0x96, 0x11, 0x27, 0x6E, 0x5B, 0x42, 0xE2, 0xCA, 0xDF, 0x98, 0x70,
    0xA3, 0xED, 0x4E, 0x36, 0xB0, 0x15, 0xEE, 0xFE, 0x15, 0xE0, 0x35, 0xDE, 0xFE, 0x25, 0xC0, 0x04,
    0xED, 0x5F, 0x47, 0x70, 0x82, 0xFB, 0xFF, 0xCA, 0x12, 0xB0, 0xA7, 0xAF, 0xCE, 0x26, 0xA0, 0xA3,
    0xFB, 0x1F, 0x0B, 0x03, 0x10, 0x24, 0xFC, 0xCF, 0xCB, 0x03, 0x30, 0x24, 0xFC, 0xEF, 0xFB, 0x04,
    0xE0, 0xC3, 0xFA, 0x5F, 0x9E, 0x27, 0x51, 0xE0, 0x86, 0xED, 0xBF, 0xFC, 0x05, 0xA0, 0x41, 0xB7,
    0xDD, 0xAF, 0xFC, 0x05, 0x80, 0x00, 0x75, 0xFC, 0x1F, 0x8E, 0x48, 0x12, 0x20, 0xA2, 0xC7, 0xDD,
    0xCF, 0x5D, 0x38, 0x22, 0x00, 0x71, 0xA6, 0xFB, 0x3F, 0xEF, 0xAB, 0x06, 0x61, 0x70, 0xC2, 0xC6,
    0xEC, 0x4F, 0x0F, 0xDC, 0x17, 0x23, 0xE0, 0x10, 0x33, 0xE8, 0xDC, 0x3F, 0x1F, 0x0D, 0x39, 0x04,
    0x71, 0x50, 0x71, 0x64, 0xE8, 0xEC, 0x5E, 0x7F, 0x7E, 0x9C, 0x18, 0x14, 0x71, 0x30, 0x20, 0x02,
    0xA5, 0xF8, 0xDC, 0x6E, 0xBF, 0xEF, 0x1E, 0x7B, 0x18, 0x05, 0x42, 0xC0, 0x70, 0x20, 0xD1, 0x63,
    0xC6, 0xF8, 0xEB, 0x9D, 0x2F, 0x9F, 0x0F, 0x6F, 0xED, 0x7B, 0x29, 0x07, 0x05, 0x33, 0x72, 0xD1,
    0x30, 0xB0, 0x20, 0x90, 0xF1, 0x42, 0x93, 0xC5, 0xE6, 0xF8, 0xF9, 0xEA, 0xCB, 0x9C, 0x7D, 0x3E,
    0x0F, 0xCF, 0x8F, 0x5F, 0x1F, 0xEF, 0xBF, 0x8F, 0x6F, 0x4F, 0x2E, 0x0E, 0xEE, 0xDE, 0xCE, 0xBD,
    0xBD, 0xAD, 0xAD, 0x9D,
    0x7D, 0x81, 0x82, 0x7D, 0x7D, 0x82, 0x82, 0x79, 0x79, 0x8A, 0x86, 0x71, 0x75, 0x92, 0x8A, 0x69,
    0x71, 0x9A, 0x96, 0x65, 0x61, 0x9D, 0xA6, 0x66, 0x4D, 0x95, 0xBE, 0x76, 0x39, 0x79, 0xCA, 0x9B,
    0x35, 0x48, 0xBE, 0xCF, 0x56, 0x1C, 0x89, 0xEB, 0xA3, 0x1D, 0x34, 0xC5, 0xEB, 0x6A, 0x04, 0x58,
    0xEA, 0xDB, 0x46, 0x04, 0x78, 0xF7, 0xCB, 0x31, 0x08, 0x84, 0xFB, 0xCB, 0x35, 0x04, 0x78, 0xF3,
    0xD7, 0x4A, 0x00, 0x58, 0xE2, 0xEF, 0x76, 0x08, 0x28, 0xB1, 0xFF, 0xB7, 0x2D, 0x04, 0x64, 0xE2,
    0xF3, 0x87, 0x11, 0x14, 0x89, 0xF3, 0xE7, 0x72, 0x08, 0x18, 0x8D, 0xF3, 0xEB, 0x7A, 0x10, 0x10,
    0x74, 0xE2, 0xF7, 0xA3, 0x2D, 0x00, 0x3C, 0xB1, 0xFB, 0xDF, 0x76, 0x14, 0x08, 0x58, 0xC6, 0xFF,
    0xD7, 0x72, 0x14, 0x04, 0x4C, 0xB6, 0xFB, 0xEB, 0x97, 0x35, 0x00, 0x20, 0x79, 0xD6, 0xFF, 0xDB,
    0x86, 0x29, 0x00, 0x1C, 0x71, 0xCA, 0xFB, 0xEF, 0xA7, 0x4D, 0x0C, 0x04, 0x34, 0x89, 0xD6, 0xFF,
    0xEB, 0xAF, 0x5A, 0x18, 0x00, 0x1C, 0x5C, 0xAA, 0xE7, 0xFF, 0xE7, 0xAB, 0x62, 0x21, 0x00, 0x08,
    0x38, 0x79, 0xBE, 0xEF, 0xFF, 0xEB, 0xBF, 0x7E, 0x41, 0x10, 0x00, 0x0C, 0x34, 0x69, 0xA6, 0xDB,
    0xF7, 0xFF, 0xEB, 0xC7, 0x92, 0x5D, 0x2D, 0x0C, 0x00, 0x08, 0x20, 0x44, 0x75, 0xA2, 0xCA, 0xEB,
    0xFB, 0xFF, 0xF3, 0xDB, 0xBB, 0x92, 0x6E, 0x49, 0x28, 0x10, 0x04, 0x00, 0x04, 0x14, 0x28, 0x40,
    0x5D, 0x79, 0x96, 0xB2, 0xCA, 0xDF, 0xEF, 0xF7, 0xFF, 0xFF, 0xFB, 0xF7, 0xEF, 0xE3, 0xD7, 0xC7,
    0xBB, 0xAA, 0x9E, 0x8E, 0x82, 0x75, 0x69, 0x5D, 0x55, 0x4D, 0x45, 0x3D, 0x38, 0x34, 0x30, 0x2C,
    0x28, 0x28, 0x28, 0x24,
};
#endif /* CONFIG_NTRX_80MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_500NS
static const MyByte8T NA5TR1_Tx_22MHz_500ns[] PROGMEM =
{
    4,
    0x6E, 0x10, 0xCC, 0xAC,
    0xCD, 0x40, 0x87, 0xCC,
    0x26, 0x84, 0xFF, 0xE7,
};
#endif /* CONFIG_NTRX_22MHZ_500NS */

#ifdef CONFIG_NTRX_22MHZ_1000NS
static const MyByte8T NA5TR1_Tx_22MHz_1000ns[] PROGMEM =
{
    8,
    0x22, 0x54, 0x1E, 0xB9, 0x07, 0xC8, 0xA4, 0xB3,
    0x5C, 0x40, 0xFF, 0xC7, 0xC0, 0x55, 0xFB, 0x8D,
    0x5E, 0x9C, 0xB7, 0x00, 0x8C, 0xFB, 0xF3, 0xDB,
};
#endif /* CONFIG_NTRX_22MHZ_1000NS */

#ifdef CONFIG_NTRX_22MHZ_2000NS
static const MyByte8T NA5TR1_Tx_22MHz_2000ns[] PROGMEM =
{
    16,
    0xE1, 0x98, 0x71, 0x04, 0x7F, 0xC7, 0x5E, 0x3D, 0x4E, 0x85, 0x6A, 0x3F, 0xF5, 0x21, 0x52, 0x4B,
    0xF6, 0x8B, 0xE3, 0xFA, 0xFA, 0xB0, 0xFE, 0x4A, 0x50, 0x15, 0xDE, 0x2F, 0x8A, 0x06, 0x33, 0x82,
    0x6D, 0xB2, 0x20, 0xFA, 0x09, 0xB4, 0xC7, 0x05, 0x68, 0xFB, 0xCB, 0x4E, 0x08, 0x04, 0x18, 0x24,
};
#endif /* CONFIG_NTRX_22MHZ_2000NS */

#ifdef CONFIG_NTRX_22MHZ_4000NS
static const MyByte8T NA5TR1_Tx_22MHz_4000ns[] PROGMEM =
{
    32,
    0xA0, 0x5F, 0x1E, 0xA2, 0x9E, 0x1B, 0xAD, 0x47, 0xFF, 0x43, 0xEB, 0x6E, 0x00, 0xF3, 0xAF, 0xC1,
    0x9E, 0x7F, 0x9F, 0x00, 0xD4, 0xF7, 0x3D, 0x26, 0x0C, 0x40, 0xC5, 0x92, 0xA0, 0xEB, 0x32, 0xB5,
    0xF7, 0x39, 0x75, 0xFC, 0x91, 0xBF, 0x41, 0x4B, 0xA8, 0x22, 0xDF, 0x33, 0x45, 0x8F, 0x44, 0x81,
    0xFD, 0xED, 0x02, 0xB1, 0xD9, 0x5F, 0x4D, 0x16, 0x71, 0xC0, 0x12, 0xC6, 0xF9, 0xDB, 0x9D, 0x6D,
    0x7D, 0x7E, 0x85, 0x76, 0x7C, 0xA3, 0x30, 0xF3, 0x01, 0xD5, 0x87, 0x18, 0xF6, 0x77, 0x0C, 0xCD,
    0xDB, 0x21, 0x20, 0xC1, 0xFB, 0x97, 0x1D, 0x04, 0x44, 0x9D, 0xE3, 0xFB, 0xFB, 0xEF, 0xE3, 0xDB,
};
#endif /* CONFIG_NTRX_22MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_8000NS
static const MyByte8T NA5TR1_Tx_22MHz_8000ns[] PROGMEM =
{
    64,
    0xDF, 0x20, 0x1D, 0xE4, 0x99, 0x29, 0xD2, 0x30, 0x4B, 0xF7, 0x46, 0xB9, 0x4B, 0xEB, 0x62, 0x4F,
    0x7B, 0xC0, 0xF7, 0x5C, 0x0D, 0x3F, 0x88, 0x9D, 0xFB, 0x44, 0xA0, 0x3C, 0x48, 0xD3, 0xBF, 0x5C,
    0x81, 0x6B, 0xBC, 0x92, 0xC3, 0xA9, 0x3F, 0x61, 0x82, 0xCD, 0x31, 0xFF, 0x6A, 0x8B, 0x80, 0x50,
    0xAB, 0xFD, 0xBD, 0x2E, 0x19, 0x09, 0x01, 0x01, 0x48, 0xD2, 0x5C, 0x65, 0xAC, 0xB1, 0x74, 0xB5,
    0xF7, 0x08, 0xF8, 0xF7, 0x18, 0xD7, 0x38, 0xC7, 0x28, 0x08, 0x95, 0xEC, 0x91, 0xDF, 0x00, 0xAD,
    0x16, 0xC4, 0x5E, 0x00, 0x9C, 0xBA, 0xB0, 0xFE, 0xF7, 0x11, 0xFE, 0x29, 0xA0, 0xCB, 0x3D, 0x01,
    0x84, 0xDF, 0x2A, 0x30, 0xC4, 0xDE, 0xBD, 0x03, 0x60, 0x97, 0xAF, 0xBD, 0x26, 0x80, 0x41, 0xB7,
    0xDD, 0xBF, 0x4D, 0x39, 0x14, 0xA1, 0x90, 0x81, 0x53, 0xC5, 0xF8, 0xFA, 0xCB, 0xAC, 0x8D, 0x6D,
    0x81, 0x7A, 0x8D, 0x69, 0xA2, 0x51, 0xBA, 0x35, 0xDA, 0x1E, 0xE5, 0x22, 0xC0, 0x6F, 0x58, 0xDB,
    0x05, 0xF1, 0x47, 0x60, 0xEB, 0x05, 0xB0, 0xC3, 0x00, 0xC1, 0xC3, 0x01, 0x98, 0xEF, 0x26, 0x38,
    0xF2, 0xAF, 0x09, 0x54, 0xF2, 0xC3, 0x21, 0x18, 0xA9, 0xFF, 0xB3, 0x2D, 0x04, 0x50, 0xC6, 0xFF,
    0xDB, 0x7E, 0x29, 0x00, 0x10, 0x44, 0x85, 0xBE, 0xE7, 0xFB, 0xFF, 0xFB, 0xEF, 0xE7, 0xDF, 0xDB,
};
#endif /* CONFIG_NTRX_22MHZ_8000NS */

#ifdef CONFIG_NTRX_22MHZ_16000NS
static const MyByte8T NA5TR1_Tx_22MHz_16000ns[] PROGMEM =
{
    128,
    0x20, 0xDF, 0x20, 0xDE, 0x21, 0x1D, 0xA3, 0x9B, 0x25, 0x19, 0xA8, 0x96, 0x2A, 0xD3, 0x2E, 0x8F,
    0xF2, 0x4A, 0xB6, 0x08, 0x77, 0xCA, 0x70, 0x96, 0x5F, 0x6A, 0x8A, 0x7C, 0x00, 0x3B, 0x8E, 0xA2,
    0x2D, 0xC5, 0xFF, 0x47, 0xE7, 0x6D, 0x83, 0xFE, 0x10, 0x17, 0x7B, 0x42, 0xEA, 0xF0, 0x00, 0xB4,
    0x27, 0x42, 0x77, 0x26, 0xC1, 0xB5, 0xAB, 0x80, 0xAC, 0xF6, 0xC4, 0x59, 0x7F, 0x95, 0xC5, 0xF5,
    0xB3, 0x44, 0x12, 0x3D, 0x28, 0x01, 0xD7, 0xFE, 0xEA, 0x83, 0x90, 0xF9, 0xF6, 0x8F, 0xC2, 0x63,
    0xFF, 0xAD, 0x09, 0x03, 0xE2, 0xBD, 0xB5, 0xD5, 0xC0, 0x0D, 0x2C, 0x7F, 0x35, 0x1A, 0x03, 0xC3,
    0x57, 0xB1, 0xBF, 0x39, 0xA5, 0xCF, 0x02, 0xC2, 0x0F, 0xE2, 0x73, 0xFD, 0xFE, 0x77, 0xEA, 0x1B,
    0x4E, 0x85, 0x01, 0x80, 0x84, 0x49, 0x10, 0xD8, 0x9F, 0xE5, 0x2A, 0x2E, 0xB1, 0x33, 0x75, 0xB5,
    0x08, 0xF7, 0x08, 0xF7, 0x08, 0x08, 0xF7, 0x18, 0xD7, 0x39, 0xB6, 0x59, 0x96, 0x79, 0x86, 0x69,
    0xA6, 0x28, 0x08, 0xA6, 0xAB, 0xE2, 0x7E, 0x40, 0xEF, 0x31, 0x6C, 0x36, 0xF6, 0xED, 0x60, 0xFF,
    0x32, 0x09, 0x1A, 0xC1, 0xEF, 0x32, 0xD8, 0x9C, 0x40, 0xEE, 0x17, 0x42, 0xDF, 0x53, 0x35, 0x7F,
    0x12, 0x96, 0x4F, 0x12, 0x95, 0x7F, 0x23, 0x03, 0xDF, 0xA6, 0x10, 0xED, 0xDC, 0x20, 0x06, 0x7F,
    0x76, 0xF0, 0xCB, 0xAF, 0x14, 0x71, 0xEB, 0x8E, 0x24, 0x30, 0xB9, 0x3F, 0xA8, 0x50, 0xA3, 0xFD,
    0x4E, 0x36, 0xA0, 0xD4, 0xFC, 0xAF, 0x99, 0x21, 0xB0, 0x97, 0xDE, 0x5F, 0x9A, 0x13, 0x20, 0xD2,
    0xE9, 0xAE, 0x5F, 0xDC, 0x16, 0x51, 0x60, 0xB1, 0xA6, 0xFA, 0x8E, 0x9F, 0x8E, 0xAC, 0x28, 0x05,
    0x52, 0xE0, 0x90, 0x40, 0xE1, 0x63, 0xB5, 0xE6, 0xF8, 0xF9, 0xDB, 0xCC, 0xAC, 0x8D, 0x7D, 0x6D,
    0x7E, 0x81, 0x7E, 0x85, 0x76, 0x8E, 0x6D, 0x96, 0x65, 0x9E, 0x5D, 0xAA, 0x51, 0xB6, 0x41, 0xC6,
    0x2D, 0xDA, 0x22, 0xDD, 0x26, 0xC8, 0x4F, 0x90, 0x97, 0x3C, 0xE7, 0x05, 0xF9, 0x22, 0xA8, 0x97,
    0x28, 0xFB, 0x0A, 0xC4, 0x8B, 0x24, 0xFE, 0x1E, 0x8C, 0xCF, 0x01, 0xD9, 0x8F, 0x14, 0xF6, 0x63,
    0x28, 0xFA, 0x57, 0x28, 0xFA, 0x6B, 0x18, 0xEA, 0x9B, 0x00, 0xB5, 0xDF, 0x15, 0x54, 0xFF, 0x7B,
    0x04, 0xA4, 0xF3, 0x46, 0x10, 0xBD, 0xEF, 0x46, 0x0C, 0xA5, 0xFB, 0x7B, 0x00, 0x58, 0xEA, 0xDB,
    0x46, 0x04, 0x6C, 0xEE, 0xE3, 0x62, 0x04, 0x30, 0xB1, 0xFF, 0xCF, 0x5A, 0x04, 0x18, 0x7D, 0xE2,
    0xFF, 0xC7, 0x62, 0x14, 0x04, 0x30, 0x81, 0xD2, 0xFB, 0xF7, 0xC7, 0x86, 0x45, 0x14, 0x00, 0x08,
    0x24, 0x50, 0x7D, 0xAA, 0xCA, 0xE7, 0xF7, 0xFF, 0xFF, 0xFB, 0xF3, 0xEF, 0xE7, 0xDF, 0xDB, 0xDB,
};
#endif /* CONFIG_NTRX_22MHZ_16000NS */

#ifdef CONFIG_NTRX_22MHZ_HR_4000NS
static const MyByte8T NA5TR1_Tx_22over80MHz_4000ns[] PROGMEM =
{
	 244,
        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
        0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x21, 0x20, 0xDF, 0x9E, 0x9E, 0x5D, 0x5D, 0x9D, 0x9E, 0xDF,
        0x20, 0xA1, 0xE2, 0x24, 0x64, 0x65, 0x65, 0x24, 0xA3, 0x21, 0x9F, 0x1D, 0xDC, 0x5A, 0x59, 0x18,
        0x59, 0xDA, 0x5C, 0xDE, 0xA1, 0x63, 0xE6, 0x68, 0xAA, 0xEB, 0xAB, 0x6A, 0xA8, 0xE5, 0x22, 0x1E,
        0x5A, 0x97, 0xD4, 0x93, 0x92, 0x92, 0x13, 0xD5, 0xD9, 0xDD, 0xE1, 0xE5, 0xEA, 0xED, 0x70, 0xB2,
        0xB2, 0x72, 0xF0, 0xED, 0xE9, 0xA5, 0x60, 0x1A, 0xD6, 0xD1, 0x0E, 0x8B, 0x8A, 0x8A, 0x0B, 0xCD,
        0xD1, 0x15, 0x5A, 0xE0, 0x25, 0x6B, 0xB0, 0xB4, 0x37, 0xB9, 0xBA, 0x7A, 0xF8, 0x36, 0x32, 0xEE,
        0xA8, 0x23, 0x9D, 0x57, 0x12, 0xCD, 0xC9, 0x46, 0xC4, 0x83, 0xC3, 0x44, 0xC6, 0xC9, 0xCD, 0x11,
        0x56, 0x9C, 0x21, 0x67, 0xAC, 0xF1, 0xF5, 0xB9, 0x7C, 0xFE, 0xFF, 0xFF, 0xBF, 0x7E, 0xBB, 0xF9,
        0xF5, 0xF1, 0xED, 0xA8, 0x64, 0x5F, 0x1A, 0x16, 0x12, 0x0E, 0x4A, 0x87, 0x05, 0x83, 0x42, 0x41,
        0x41, 0x41, 0x82, 0x03, 0x85, 0x07, 0xCA, 0x8C, 0x50, 0x53, 0x16, 0x1A, 0xDD, 0xE1, 0xA4, 0x68,
        0x6B, 0x2E, 0xB1, 0x74, 0xF6, 0x78, 0xFA, 0x3C, 0x7D, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF,
        0xBE, 0x7D, 0x3C, 0xBB, 0x7A, 0x38, 0xB7, 0x35, 0xF4, 0x72, 0xF0, 0x6E, 0x2C, 0xAB, 0x29, 0xA7,
        0x25, 0xE4, 0x62, 0xE0, 0x9F, 0x1D, 0xDC, 0x5A, 0x19, 0xD7, 0x96, 0x15, 0xD4, 0x93, 0x52, 0x11,
        0x10, 0xCF, 0x8E, 0x4E, 0x4D, 0x0C, 0x0C, 0xCB, 0xCB, 0x8B, 0x8A, 0x8A, 0x4A, 0x49, 0x49, 0x49,
        0x49, 0x49, 0x49, 0x09,
        0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18, 0x18, 0x18,
        0x18, 0x18, 0x08, 0x08, 0xF8, 0xF8, 0xE8, 0xE8, 0xE7, 0xE7, 0xF7, 0x07, 0x17, 0x27, 0x27, 0x37,
        0x48, 0x48, 0x38, 0x39, 0x19, 0x09, 0xE9, 0xD9, 0xB8, 0xA8, 0xA7, 0xA7, 0xB6, 0xC6, 0xE6, 0x16,
        0x36, 0x56, 0x77, 0x97, 0x98, 0x99, 0x89, 0x6A, 0x3A, 0x0A, 0xDA, 0xAA, 0x79, 0x58, 0x48, 0x47,
        0x46, 0x65, 0x94, 0xC4, 0x04, 0x44, 0x85, 0xB5, 0xE6, 0x07, 0x08, 0x09, 0xEA, 0xBB, 0x8C, 0x3C,
        0xFC, 0xAC, 0x5B, 0x2A, 0xE9, 0xC8, 0xC7, 0xC6, 0xE4, 0x13, 0x43, 0x92, 0xE2, 0x42, 0x93, 0xE3,
        0x24, 0x56, 0x77, 0x88, 0x8A, 0x7B, 0x4C, 0x0D, 0xBE, 0x6E, 0x0E, 0xBE, 0x5D, 0x0D, 0xCC, 0x8A,
        0x69, 0x48, 0x46, 0x55, 0x74, 0xA2, 0xE1, 0x31, 0x80, 0xE0, 0x40, 0x91, 0xE1, 0x32, 0x73, 0xB5,
        0xD6, 0xE7, 0xF9, 0xEA, 0xCB, 0xAC, 0x7D, 0x3E, 0xEF, 0xAF, 0x4F, 0xFF, 0xAF, 0x5F, 0x1E, 0xCD,
        0x9C, 0x6B, 0x3A, 0x29, 0x18, 0x17, 0x16, 0x25, 0x44, 0x63, 0x92, 0xC1, 0x01, 0x40, 0x80, 0xC0,
        0x00, 0x40, 0x80, 0xC1, 0x01, 0x32, 0x62, 0x93, 0xB4, 0xD5, 0xE6, 0xF7, 0xF7, 0xF8, 0xF9, 0xFA,
        0xEB, 0xCC, 0xBC, 0x9D, 0x7D, 0x4E, 0x2E, 0xFF, 0xDF, 0xAF, 0x7F, 0x4F, 0x1F, 0xFF, 0xCF, 0x9F,
        0x7F, 0x4F, 0x2F, 0x0E, 0xEE, 0xCE, 0xAD, 0x9D, 0x7C, 0x6C, 0x5B, 0x4B, 0x3B, 0x2A, 0x2A, 0x19,
        0x19, 0x18, 0x18, 0x17, 0x17, 0x17, 0x16, 0x16, 0x16, 0x25, 0x25, 0x25, 0x34, 0x34, 0x44, 0x44,
        0x54, 0x53, 0x63, 0x63, 0x73, 0x73, 0x83, 0x82, 0x92, 0x92, 0x92, 0xA2, 0xA2, 0xA2, 0xA2, 0xB2,
        0xB2, 0xB2, 0xB2, 0xB2,
        0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x86, 0x86, 0x86, 0x86,
        0x86, 0x82, 0x82, 0x7E, 0x7D, 0x79, 0x79, 0x79, 0x79, 0x79, 0x7D, 0x82, 0x86, 0x8A, 0x8E, 0x92,
        0x92, 0x92, 0x8E, 0x8A, 0x86, 0x7E, 0x75, 0x71, 0x6D, 0x69, 0x69, 0x69, 0x71, 0x75, 0x81, 0x8A,
        0x92, 0x9A, 0xA2, 0xA6, 0xA6, 0xA2, 0x9E, 0x96, 0x8A, 0x7E, 0x6D, 0x61, 0x59, 0x51, 0x51, 0x51,
        0x55, 0x5D, 0x69, 0x79, 0x8A, 0x9A, 0xAA, 0xB6, 0xBE, 0xC3, 0xC3, 0xBF, 0xB6, 0xAA, 0x9A, 0x86,
        0x71, 0x61, 0x4D, 0x41, 0x34, 0x30, 0x30, 0x34, 0x3C, 0x49, 0x5D, 0x71, 0x85, 0x9A, 0xAE, 0xC2,
        0xD3, 0xDB, 0xE3, 0xE3, 0xDF, 0xD7, 0xCB, 0xBB, 0xA6, 0x8E, 0x7A, 0x61, 0x4D, 0x39, 0x28, 0x1C,
        0x14, 0x10, 0x10, 0x18, 0x24, 0x30, 0x44, 0x59, 0x6D, 0x85, 0x9A, 0xB2, 0xC6, 0xD7, 0xE7, 0xF3,
        0xFB, 0xFF, 0xFB, 0xF7, 0xEF, 0xE7, 0xD7, 0xC7, 0xB2, 0x9E, 0x8A, 0x75, 0x61, 0x4D, 0x39, 0x28,
        0x1C, 0x10, 0x08, 0x04, 0x04, 0x04, 0x08, 0x0C, 0x14, 0x20, 0x2C, 0x38, 0x49, 0x59, 0x69, 0x79,
        0x8A, 0x9A, 0xAA, 0xBA, 0xCB, 0xD7, 0xDF, 0xEB, 0xF3, 0xF7, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB,
        0xF7, 0xEF, 0xEB, 0xE3, 0xD7, 0xCF, 0xC7, 0xBA, 0xAE, 0xA2, 0x9A, 0x8E, 0x82, 0x75, 0x6D, 0x61,
        0x59, 0x4D, 0x45, 0x3D, 0x34, 0x2C, 0x28, 0x20, 0x1C, 0x14, 0x10, 0x0C, 0x0C, 0x08, 0x08, 0x04,
        0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0C, 0x0C, 0x10, 0x10, 0x14,
        0x14, 0x18, 0x18, 0x1C, 0x1C, 0x20, 0x20, 0x20, 0x24, 0x24, 0x24, 0x28, 0x28, 0x28, 0x2C, 0x2C,
        0x2C, 0x2C, 0x2C, 0x2C
};
#endif /* CONFIG_NTRX_22MHZ_HR_4000NS */

#ifdef CONFIG_NTRX_80MHZ_500NS
const NTRXagcValSt NA5TR1_AGC_80MHz_500ns[] PROGMEM =
{
    /* symbolDur NA_500us */
    {1, 1, 16, 0,  260}, /* symbolRate NA_500k */
    {1, 1, 16, 0,  130}, /* symbolRate NA_1M */
    {1, 1, 16, 0,   65}, /* symbolRate NA_2M */
    {0, 0,  0, 0,    0}, /* dummy */
    {1, 1, 16, 0, 4160}, /* symbolRate NA_31k25 */
    {1, 1, 16, 0, 2080}, /* symbolRate NA_62k5 */
    {1, 1, 16, 0, 1040}, /* symbolRate NA_125k */
    {1, 1, 16, 0,  2520}, /* symbolRate NA_250k */
};
#endif /* CONFIG_NTRX_80MHZ_500NS */

#ifdef CONFIG_NTRX_80MHZ_1000NS
const NTRXagcValSt NA5TR1_AGC_80MHz_1000ns[] PROGMEM =
{
/* symbolDur NA_1ns */
    {5, 1, 12, 0, 122}, /* symbolRate NA_500k */
    {3, 1, 16, 0, 130}, /* symbolRate NA_1M */
    {0, 0,  0, 0,   0}, /* dummy */
    {0, 0,  0, 0,   0}, /* dummy */
    {5, 1, 12, 0, 122}, /* symbolRate NA_31k25 */
    {5, 1, 12, 0, 122}, /* symbolRate NA_62k5 */
    {5, 1, 12, 0, 122}, /* symbolRate NA_125k */
    {5, 1, 12, 0, 122}, /* symbolRate NA_250k */
};
#endif /* CONFIG_NTRX_80MHZ_1000NS */

#ifdef CONFIG_NTRX_80MHZ_2000NS
const NTRXagcValSt NA5TR1_AGC_80MHz_2000ns[] PROGMEM =
{
    /* symbolDur NA_2ns */
    {7, 1, 16, 0, 260}, /* symbolRate NA_500k */
    {0, 0,  0, 0,   0}, /* dummy */
    {0, 0,  0, 0,   0}, /* dummy */
    {0, 0,  0, 0,   0}, /* dummy */
    {7, 1, 12, 0, 4160}, /* symbolRate NA_31k25 */
    {7, 1, 16, 0, 2080}, /* symbolRate NA_62k5 */
    {7, 1, 16, 0, 1040}, /* symbolRate NA_125k */
    {7, 1, 16, 0,  520}, /* symbolRate NA_250k */
};
#endif /* CONFIG_NTRX_80MHZ_2000NS */

#ifdef CONFIG_NTRX_80MHZ_4000NS
const NTRXagcValSt NA5TR1_AGC_80MHz_4000ns[] PROGMEM =
{
    /* symbolDur NA_4ns */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {14, 1, 16, 0, 4160}, /* symbolRate NA_31k25 */
    {14, 1, 16, 0, 2080}, /* symbolRate NA_62k5 */
    {14, 1, 16, 0, 1040}, /* symbolRate NA_125k */
    {14, 1, 16, 0,  520}, /* symbolRate NA_250k */
};
#endif /* CONFIG_NTRX_80MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_HR_4000NS
const NTRXagcValSt NA5TR1_AGC_22MHz_HR_4000ns[] PROGMEM =
{
    /* symbolDur NA_4ns */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {0, 0,  0, 0,     0}, /* dummy */
    {14, 1, 16, 0, 4160}, /* symbolRate NA_31k25 */
    {14, 1, 16, 0, 2080}, /* symbolRate NA_62k5 */
    {14, 1, 16, 0, 1040}, /* symbolRate NA_125k */
    {14, 1, 16, 0,  520}, /* symbolRate NA_250k */
};
#endif /* CONFIG_NTRX_22MHZ_HR_4000NS */

#ifdef CONFIG_NTRX_80MHZ_500NS
static MyByte8T NA5TR1_THRES_80MHz_500ns[] PROGMEM =
{
    0x00, 0x20, 0x20, 0x20, 0x20, /* sd:0/sr:4 */
};
#endif /* CONFIG_TRX_80MHZ_500NS */

#ifdef CONFIG_NTRX_80MHZ_1000NS
static MyByte8T NA5TR1_THRES_80MHz_1000ns[] PROGMEM =
{
    0x00, 0x36, 0x36, 0x36, 0x36, /* sd:1/sr:4 */
};
#endif /* CONFIG_TRX_80MHZ_1000NS */

#ifdef CONFIG_NTRX_80MHZ_2000NS
static MyByte8T NA5TR1_THRES_80MHz_2000ns[] PROGMEM =
{
    0x00, 0x5A, 0x5A, 0x5A, 0x5A, /* sd:2/sr:4 */
};
#endif /* CONFIG_NTRX_80MHZ_2000NS */

#ifdef CONFIG_NTRX_80MHZ_4000NS
static MyByte8T NA5TR1_THRES_80MHz_4000ns[] PROGMEM =
{
    0x00, 0x8D, 0x8D, 0x8D, 0x8D, /* sd:3/sr:4 */
};
#endif /* CONFIG_NTRX_80MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_HR_4000NS
static MyByte8T NA5TR1_THRES_22MHz_HR_4000ns[] PROGMEM =
{
    0x00, 0x8D, 0x8D, 0x8D, 0x8D, /* sd:3/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_HR_4000NS */

#ifdef CONFIG_NTRX_22MHZ_500NS
static MyByte8T NA5TR1_THRES_22MHz_500ns[] PROGMEM =
{
    0x00, 0x0B, 0x0B, 0x0B, 0x0B, /* sd:0/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_500NS */

#ifdef CONFIG_NTRX_22MHZ_1000NS
static MyByte8T NA5TR1_THRES_22MHz_1000ns[] PROGMEM =
{
    0x00, 0x11, 0x11, 0x11, 0x11, /* sd:1/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_1000NS */

#ifdef CONFIG_NTRX_22MHZ_2000NS
static MyByte8T NA5TR1_THRES_22MHz_2000ns[] PROGMEM =
{
    0x00, 0x20, 0x20, 0x20, 0x20, /* sd:2/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_2000NS */

#ifdef CONFIG_NTRX_22MHZ_4000NS
static MyByte8T NA5TR1_THRES_22MHz_4000ns[] PROGMEM =
{
    0x00, 0x31, 0x31, 0x31, 0x31, /* sd:3/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_4000NS */

#ifdef CONFIG_NTRX_22MHZ_8000NS
static MyByte8T NA5TR1_THRES_22MHz_8000ns[] PROGMEM =
{
    0x00, 0x63, 0x63, 0x63, 0x63, /* sd:4/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_8000NS */

#ifdef CONFIG_NTRX_22MHZ_16000NS
static MyByte8T NA5TR1_THRES_22MHz_16000ns[] PROGMEM =
{
    0x00, 0xC7, 0xC7, 0xC7, 0xC7  /* sd:5/sr:4 */
};
#endif /* CONFIG_NTRX_22MHZ_16000NS */

void NTRXSetRxIQMatrix (MyByte8T bandwidth, MyByte8T symbolDur)
{
    MyByte8T tmpBuffer[64];
    MyByte8T *ptr = 0;
    MyWord16T len;
    if (bandwidth == NA_22MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_22MHZ_500NS
            case NA_500ns: ptr = (MyByte8T *)NA5TR1_Rx_22MHz_500ns; break;
#			endif /* CONFIG_NTRX_22MHZ_500NS */
#			ifdef CONFIG_NTRX_22MHZ_1000NS
            case NA_1us:   ptr = (MyByte8T *)NA5TR1_Rx_22MHz_1000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_1000NS */
#			ifdef CONFIG_NTRX_22MHZ_2000NS
             case NA_2us:   ptr = (MyByte8T *)NA5TR1_Rx_22MHz_2000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_2000NS */
#			ifdef CONFIG_NTRX_22MHZ_4000NS
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Rx_22MHz_4000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_4000NS */
#			ifdef CONFIG_NTRX_22MHZ_8000NS
            case NA_8us:   ptr = (MyByte8T *)NA5TR1_Rx_22MHz_8000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_8000NS */
#			ifdef CONFIG_NTRX_22MHZ_16000NS
            case NA_16us:  ptr = (MyByte8T *)NA5TR1_Rx_22MHz_16000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_16000NS */
            default: return;
        }
    }
    if (bandwidth == NA_80MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_80MHZ_500NS
            case NA_500ns: ptr = (MyByte8T *)NA5TR1_Rx_80MHz_500ns; break;
#			endif /* CONFIG_NTRX_80MHZ_500NS */
#			ifdef CONFIG_NTRX_80MHZ_1000NS
            case NA_1us:   ptr = (MyByte8T *)NA5TR1_Rx_80MHz_1000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_1000NS */
#			ifdef CONFIG_NTRX_80MHZ_2000NS
            case NA_2us:   ptr = (MyByte8T *)NA5TR1_Rx_80MHz_2000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_2000NS */
#			ifdef CONFIG_NTRX_80MHZ_4000NS
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Rx_80MHz_4000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_4000NS */
            default: return;
        }
    }
    if (bandwidth == NA_22MHz_HR) 
    {
        switch (symbolDur)
        {
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Rx_22MHz_HR_4000ns; break;
            default: return;
        }
    }

    len = ReadRomByte (ptr[0]);
    /* Device select 3 */
    memcpy_P (tmpBuffer, &(ptr[1]), len);
    NTRXSetIndexReg (0x30);
    NTRXWriteSPI ((NA_RamD3lPatI_O & 0xff),     tmpBuffer, len);

    memcpy_P (tmpBuffer, &(ptr[1+ len]), len);
    NTRXSetIndexReg (0x31);
    NTRXWriteSPI ((NA_RamD3lPatQ_O & 0xff),     tmpBuffer, len);

    NTRXSetIndexReg (0x00);
}


void NTRXSetTxIQMatrix (MyByte8T bandwidth, MyByte8T symbolDur)
{
    MyByte8T tmpBuffer[245];
    MyWord16T len;
    MyWord16T offset;
    MyByte8T *ptr = 0;

    if (bandwidth == NA_22MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_22MHZ_500NS
            case NA_500ns: ptr = (MyByte8T *)NA5TR1_Tx_22MHz_500ns; break;
#			endif /* CONFIG_NTRX_22MHZ_500NS */
#			ifdef CONFIG_NTRX_22MHZ_1000NS
            case NA_1us:   ptr = (MyByte8T *)NA5TR1_Tx_22MHz_1000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_1000NS */
#			ifdef CONFIG_NTRX_22MHZ_2000NS
            case NA_2us:   ptr = (MyByte8T *)NA5TR1_Tx_22MHz_2000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_2000NS */
#			ifdef CONFIG_NTRX_22MHZ_4000NS
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Tx_22MHz_4000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_4000NS */
#			ifdef CONFIG_NTRX_22MHZ_8000NS
            case NA_8us:   ptr = (MyByte8T *)NA5TR1_Tx_22MHz_8000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_8000NS */
#			ifdef CONFIG_NTRX_22MHZ_16000NS
            case NA_16us:  ptr = (MyByte8T *)NA5TR1_Tx_22MHz_16000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_16000NS */
            default: return;
        }
    }
    if (bandwidth == NA_80MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_80MHZ_500NS
            case NA_500ns: ptr = (MyByte8T *)NA5TR1_Tx_80MHz_500ns; break;
#			endif /* CONFIG_NTRX_80MHZ_500NS */
#			ifdef CONFIG_NTRX_80MHZ_1000NS
            case NA_1us:   ptr = (MyByte8T *)NA5TR1_Tx_80MHz_1000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_1000NS */
#			ifdef CONFIG_NTRX_80MHZ_2000NS
            case NA_2us:   ptr = (MyByte8T *)NA5TR1_Tx_80MHz_2000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_2000NS */
#			ifdef CONFIG_NTRX_80MHZ_4000NS
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Tx_80MHz_4000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_4000NS */
            default: return;
        }
    }
    if (bandwidth == NA_22MHz_HR) 
    {
        switch (symbolDur)
        {
            case NA_4us:   ptr = (MyByte8T *)NA5TR1_Tx_22over80MHz_4000ns; break;
            default: return;
        }
    }

    len = ReadRomByte (ptr[0]);

    NTRXSetIndexReg (0x20);
    // TrxDI "w CsqMemAddrInit 1";

    NTRXSetRegister (NA_CsqMemAddrInit, TRUE);
    offset = 0;
    if (len > 128)
    {
        len -= 128;
        memcpy_P (tmpBuffer, &(ptr[1]), 128);
        NTRXWriteSPI (0x80, tmpBuffer, 128);
        offset = 128;
    }
    memcpy_P (tmpBuffer, &(ptr[1 + offset]), len);
    NTRXWriteSPI (0x80, tmpBuffer, len);

    NTRXSetRegister (NA_CsqMemAddrInit, TRUE);
    NTRXSetIndexReg (0x21);
    offset = 0;
    len = ReadRomByte (ptr[0]);
    if (len > 128)
    {
        len -= 128;
        memcpy_P (tmpBuffer, &(ptr[1 + ReadRomByte (ptr[0])]), 128);
        NTRXWriteSPI (0x80, tmpBuffer, 128);
        offset = 128;
    }
    memcpy_P (tmpBuffer, &(ptr[1 + ReadRomByte (ptr[0]) + offset]), len);
    NTRXWriteSPI (0x80, tmpBuffer, len);

    NTRXSetRegister (NA_CsqMemAddrInit, TRUE);
    NTRXSetIndexReg (0x22);

    len = ReadRomByte (ptr[0]);
    offset = 0;
    if (len > 128)
    {
         len -= 128;
        memcpy_P (tmpBuffer, &(ptr[1 + (2 * ReadRomByte (ptr[0]))]), 128);
        NTRXWriteSPI (0x80, tmpBuffer, 128);
        offset = 128;
    }
    memcpy_P (tmpBuffer, &(ptr[1 + (2 * ReadRomByte (ptr[0])) + offset]), len);
    NTRXWriteSPI (0x80, tmpBuffer, len);

    NTRXSetIndexReg (0x00);
}

void NTRXSetAgcValues (MyByte8T bandwidth, MyByte8T symbolDur, MyByte8T symbolRate)
{
    NTRXagcValSt *agcValS = NULL;
    MyByte8T value[2];
    MyInt16T inttime;

    if (bandwidth == NA_22MHz_HR)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_22MHZ_HR_4000NS
            case NA_4us:   agcValS = (NTRXagcValSt *)&(NA5TR1_AGC_22MHz_HR_4000ns[symbolRate]); break;
#			endif /* CONFIG_NTRX_22MHZ_HR_4000NS */
           default: return;
        }

        NTRXSetRegister (NA_AgcAmplitude, 31);
        NTRXSetRegister (NA_FdmaEnable, FALSE);
        NTRXSetRegister (NA_PulseDetDelay, 4);
        NTRXSetRegister (NA_GateAdjBitsyncEn, TRUE);
        NTRXSetRegister (NA_GateAdjFramesyncEn, FALSE);
	
        NTRXSetRegister (NA_GateSizeUnsync, 3);
		NTRXSetRegister (NA_GateSizeBitsync, 3);
	
		NTRXSetRegister (NA_GateAdjThreshold, 3);

		NTRXSetRegister (NA_Go2BitsyncThreshold, 3);
		NTRXSetRegister (NA_LeaveBitsyncThreshold, 3);
	
		NTRXSetRegister (NA_UseMapThresh1InFramesync, TRUE);
		NTRXSetRegister (NA_Go2MapThresh1InBitsync, 7);
		NTRXSetRegister (NA_LeaveMapThresh1InBitsync, 7);
    }
    if (bandwidth == NA_80MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_80MHZ_500NS
            case NA_500ns: agcValS = (NTRXagcValSt *)&(NA5TR1_AGC_80MHz_500ns[symbolRate]); break;
#			endif /* CONFIG_NTRX_80MHZ_500NS */
#			ifdef CONFIG_NTRX_80MHZ_1000NS
            case NA_1us:   agcValS = (NTRXagcValSt *)&(NA5TR1_AGC_80MHz_1000ns[symbolRate]); break;
#			endif /* CONFIG_NTRX_80MHZ_1000NS */
#			ifdef CONFIG_NTRX_80MHZ_2000NS
            case NA_2us:   agcValS = (NTRXagcValSt *)&(NA5TR1_AGC_80MHz_2000ns[symbolRate]); break;
#			endif /* CONFIG_NTRX_80MHZ_2000NS */
#			ifdef CONFIG_NTRX_80MHZ_4000NS
            case NA_4us:   agcValS = (NTRXagcValSt *)&(NA5TR1_AGC_80MHz_4000ns[symbolRate]); break;
#			endif /* CONFIG_NTRX_80MHZ_4000NS */
           default: return;
        }
        NTRXSetRegister (NA_FdmaEnable, FALSE);
        NTRXSetRegister (NA_PulseDetDelay, 4);
    }
    if (bandwidth == NA_22MHz)
    {
        NTRXSetRegister (NA_AgcHold, TRUE);
        NTRXSetRegister (NA_AgcDefaultEn, TRUE);
        NTRXSetRegister (NA_AgcValue, 35);

        NTRXSetRegister (NA_FdmaEnable, TRUE);
        NTRXSetRegister (NA_PulseDetDelay, 2);
       
    }
    
    NTRXSetRegister (NA_LnaFreqAdjust, FALSE);
    NTRXSetRegister (NA_GateSizeFramesync, NA_GateSize9Slots_VC_C);

     /*select 0: MAP (maximum a posteriori) mode (peak detection)
         or     1: FIX mode (threshold detection)
    */
    NTRXSetRegister (NA_D3lFixnMap, settingVal.fixnmap); 

    NTRXSetRegister (NA_SymbolDur, symbolDur);
    NTRXSetRegister (NA_SymbolRate, symbolRate);

    if (bandwidth != NA_22MHz)
    {
	    NTRXSetRegister (NA_AgcThresHold1, ReadRomByte (agcValS->thresh1));
    	NTRXSetRegister (NA_AgcThresHold2, ReadRomByte (agcValS->thresh2));
    	NTRXSetRegister (NA_AgcDeadTime, ReadRomByte (agcValS->deadtime));
    	NTRXSetRegister (NA_AgcNregLength, ReadRomByte (agcValS->nreg));

    	inttime = ReadRomWord (agcValS->inttime); 
    	value[0] = 0xFF & (inttime);
    	value[1] = 0xFF & ((inttime)>>8);

    	NTRXSetNRegister (NA_AgcIntTime, value);
	  	// NTRXSetRegister (NA_AgcAmplitude, agcValS->agcAmplitude);
    	// NTRXSetRegister (NA_AgcRangeOffset, agcValS->agcRangeOffset);
	}
}

void NTRXSetCorrThreshold (MyByte8T bandwidth, MyByte8T symbolDur)
{
    MyByte8T threshold[5];
    MyByte8T *ptr = 0;

    NTRXSetIndexReg (0x32);
    if (bandwidth == NA_80MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_80MHZ_500NS
            case NA_500ns:  ptr = NA5TR1_THRES_80MHz_500ns; break;
#			endif /* CONFIG_NTRX_80MHZ_500NS */
#			ifdef CONFIG_NTRX_80MHZ_1000NS
            case NA_1us:    ptr = NA5TR1_THRES_80MHz_1000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_1000NS */
#			ifdef CONFIG_NTRX_80MHZ_2000NS
            case NA_2us:    ptr = NA5TR1_THRES_80MHz_2000ns; break;
#			endif /* CONFIG_NTRX_80MHZ_2000NS */
#			ifdef CONFIG_NTRX_80MHZ_4000NS
            case NA_4us:    ptr = NA5TR1_THRES_80MHz_4000ns; break;
#			endif /* NTRX_80MHZ_4000NS */
            default:        return;
        }
    }

    if (bandwidth == NA_22MHz)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_22MHZ_500NS
            case NA_500ns:  ptr = NA5TR1_THRES_22MHz_500ns; break;
#			endif /* CONFIG_NTRX_22MHZ_500NS */
#			ifdef CONFIG_NTRX_22MHZ_1000NS
            case NA_1us:    ptr = NA5TR1_THRES_22MHz_1000ns; break;
#			endif /* NTRX_22MHZ_1000NS */
#			ifdef CONFIG_NTRX_22MHZ_2000NS
            case NA_2us:    ptr = NA5TR1_THRES_22MHz_2000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_2000NS */
#			ifdef CONFIG_NTRX_22MHZ_4000NS
            case NA_4us:    ptr = NA5TR1_THRES_22MHz_4000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_4000NS */
#			ifdef CONFIG_NTRX_22MHZ_8000NS
            case NA_8us:    ptr = NA5TR1_THRES_22MHz_8000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_8000NS */
#			ifdef CONFIG_NTRX_22MHZ_16000NS
            case NA_16us:   ptr = NA5TR1_THRES_22MHz_16000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_16000NS */
            default:        return;
        }
    }
    if (bandwidth == NA_22MHz_HR)
    {
        switch (symbolDur)
        {
#			ifdef CONFIG_NTRX_22MHZ_HR_4000NS
            case NA_4us:    ptr = NA5TR1_THRES_22MHz_HR_4000ns; break;
#			endif /* CONFIG_NTRX_22MHZ_HR_4000NS */
            default:        return;
        }
    }

    memcpy_P (threshold, ptr, 5);
    NTRXWriteSPI (0x80, threshold, 5);
    NTRXSetIndexReg (0x00);
}
#endif /* */
